// Author: Ivan Chau
package uk.ac.cam.kcic2.math;

public class Translation extends Transform {

	private final double tx,ty,tz;
	
	public Translation(double xOffset, double yOffset, double zOffset) {
		super(new double[][]{
				{1,0,0,xOffset},
				{0,1,0,yOffset},
				{0,0,1,zOffset},
				{0,0,0,1}
		});
		tx = xOffset;
		ty = yOffset;
		tz = zOffset;
	}

	public Translation inverse(){
		return new Translation(-tx,-ty,-tz);
	}
	
}
